//package com.menu.web.controller.goods;
//
//import com.menu.common.annotation.Log;
//import com.menu.common.core.controller.BaseController;
//import com.menu.common.core.domain.AjaxResult;
//import com.menu.common.core.page.TableDataInfo;
//import com.menu.common.enums.BusinessType;
//import com.menu.common.utils.poi.ExcelUtil;
//import com.menu.system.domain.MenuGoods;
//import com.menu.system.service.IMenuGoodsService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.security.access.prepost.PreAuthorize;
//import org.springframework.web.bind.annotation.*;
//
//import javax.servlet.http.HttpServletResponse;
//import java.util.List;
//
///**
// * 菜单权限Controller
// *
// * @author ruoyi
// * @date 2024-06-05
// */
//@RestController
//@RequestMapping("/system/goods")
//public class MenuGoodsController extends BaseController {
//    @Autowired
//    private IMenuGoodsService menuGoodsService;
//
//    /**
//     * 查询菜单权限列表
//     */
//    @PreAuthorize("@ss.hasPermi('system:goods:list')")
//    @GetMapping("/list")
//    public TableDataInfo list(MenuGoods menuGoods) {
//        startPage();
//        List<MenuGoods> list = menuGoodsService.selectMenuGoodsList(menuGoods);
//        return getDataTable(list);
//    }
//
//    /**
//     * 导出菜单权限列表
//     */
//    @PreAuthorize("@ss.hasPermi('system:goods:export')")
//    @Log(title = "菜单权限", businessType = BusinessType.EXPORT)
//    @PostMapping("/export")
//    public void export(HttpServletResponse response, MenuGoods menuGoods) {
//        List<MenuGoods> list = menuGoodsService.selectMenuGoodsList(menuGoods);
//        ExcelUtil<MenuGoods> util = new ExcelUtil<MenuGoods>(MenuGoods.class);
//        util.exportExcel(response, list, "菜单权限数据");
//    }
//
//    /**
//     * 获取菜单权限详细信息
//     */
//    @PreAuthorize("@ss.hasPermi('system:goods:query')")
//    @GetMapping(value = "/{goodsId}")
//    public AjaxResult getInfo(@PathVariable("goodsId") Long goodsId) {
//        return success(menuGoodsService.selectMenuGoodsByGoodsId(goodsId));
//    }
//
//    /**
//     * 新增菜单权限
//     */
//    @PreAuthorize("@ss.hasPermi('system:goods:add')")
//    @Log(title = "菜单权限", businessType = BusinessType.INSERT)
//    @PostMapping
//    public AjaxResult add(@RequestBody MenuGoods menuGoods) {
//        return toAjax(menuGoodsService.insertMenuGoods(menuGoods));
//    }
//
//    /**
//     * 修改菜单权限
//     */
//    @PreAuthorize("@ss.hasPermi('system:goods:edit')")
//    @Log(title = "菜单权限", businessType = BusinessType.UPDATE)
//    @PutMapping
//    public AjaxResult edit(@RequestBody MenuGoods menuGoods) {
//        return toAjax(menuGoodsService.updateMenuGoods(menuGoods));
//    }
//
//    /**
//     * 删除菜单权限
//     */
//    @PreAuthorize("@ss.hasPermi('system:goods:remove')")
//    @Log(title = "菜单权限", businessType = BusinessType.DELETE)
//    @DeleteMapping("/{goodsIds}")
//    public AjaxResult remove(@PathVariable Long[] goodsIds) {
//        return toAjax(menuGoodsService.deleteMenuGoodsByGoodsIds(goodsIds));
//    }
//}
